<template>
  <div id="app">
    <YunHeader></YunHeader>
      <router-view/>
    <YunFooter></YunFooter>
  </div>
</template>
<script>
import YunHeader from '@/components/YunHeader'
import YunFooter from '@/components/YunFooter'
export default {
  components:{
    YunHeader,
    YunFooter
  },
  data(){
    return {
      pageData:this.$lang[this.$store.state.lang].head,
      creenWidth: document.body.clientWidth,
    }
  },
  watch: {
    '$route': function(to,from){
　    document.body.scrollTop = 0
      document.documentElement.scrollTop = 0
    },
    '$store.state.lang'(val){
      //变化之后根据自己项目需求写自身的逻辑代码，下面只是示例
        this.homeData=this.$lang[this.$store.state.lang]
    },
  }
}
</script>
<style lang="scss">
  #app{
    width:100%;
    height:100%;
  }
</style>
